package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.PersonTrainTest;
import com.zhijian.medical.entity.vo.request.PersonTrainTestSearchVo;
import com.zhijian.medical.entity.vo.response.PersonTrainTestVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PersonTrainTestMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PersonTrainTest record);

    int insertSelective(PersonTrainTest record);

    PersonTrainTest selectByPrimaryKey(Long id);

    /**
     * 根据人员ID查询
     *
     * @param personId
     * @return
     */
    PersonTrainTest selectByPersonId(Long personId);

    int updateByPrimaryKeySelective(PersonTrainTest record);

    int updateByPrimaryKey(PersonTrainTest record);

    int count(PersonTrainTestSearchVo personTrainTestSearchVo);

    List<PersonTrainTestVo> selectList(PersonTrainTestSearchVo personTrainTestSearchVo);

    PersonTrainTestVo selectVoById(Long id);

    /**
     * 人员ID查询vo
     *
     * @param personId
     * @return
     */
    PersonTrainTestVo selectVoByPersonId(Long personId);

    int insertBatch(@Param("entities") List<PersonTrainTest> entities);

    /**
     * 查询出某天最新数据的code
     *
     * @return
     */
    String selectMaxCodeByDay(String day);
}